home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / SYSCTL.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  14KB  |  538 lines

  1. /*
  2.  * sysctl.h: General linux system control interface
  3.  *
  4.  * Begun 24 March 1995, Stephen Tweedie
  5.  *
  6.  ****************************************************************
  7.  ****************************************************************
  8.  **
  9.  **  WARNING:  
  10.  **  The values in this file are exported to user space via 
  11.  **  the sysctl() binary interface.  Do *NOT* change the 
  12.  **  numbering of any existing values here, and do not change
  13.  **  any numbers within any one set of values.  If you have
  14.  **  to redefine an existing interface, use a new number for it.
  15.  **  The kernel will then return ENOTDIR to any application using
  16.  **  the old binary interface.
  17.  **
  18.  **  --sct
  19.  **
  20.  ****************************************************************
  21.  ****************************************************************
  22.  */
  23.  
  24. #include <linux/lists.h>
  25.  
  26. #ifndef _LINUX_SYSCTL_H
  27. #define _LINUX_SYSCTL_H
  28.  
  29. #define CTL_MAXNAME 10
  30.  
  31. struct __sysctl_args {
  32.     int *name;
  33.     int nlen;
  34.     void *oldval;
  35.     size_t *oldlenp;
  36.     void *newval;
  37.     size_t newlen;
  38.     unsigned long __unused[4];
  39. };
  40.  
  41. /* Define sysctl names first */
  42.  
  43. /* Top-level names: */
  44.  
  45. /* For internal pattern-matching use only: */
  46. #ifdef __KERNEL__
  47. #define CTL_ANY        -1    /* Matches any name */
  48. #define CTL_NONE    0
  49. #endif
  50.  
  51. enum
  52. {
  53.     CTL_KERN=1,        /* General kernel info and control */
  54.     CTL_VM=2,        /* VM management */
  55.     CTL_NET=3,        /* Networking */
  56.     CTL_PROC=4,        /* Process info */
  57.     CTL_FS=5,        /* Filesystems */
  58.     CTL_DEBUG=6,        /* Debugging */
  59.     CTL_DEV=7        /* Devices */
  60. };
  61.  
  62.  
  63. /* CTL_KERN names: */
  64. enum
  65. {
  66.     KERN_OSTYPE=1,        /* string: system version */
  67.     KERN_OSRELEASE=2,    /* string: system release */
  68.     KERN_OSREV=3,        /* int: system revision */
  69.     KERN_VERSION=4,        /* string: compile time info */
  70.     KERN_SECUREMASK=5,    /* struct: maximum rights mask */
  71.     KERN_PROF=6,        /* table: profiling information */
  72.     KERN_NODENAME=7,
  73.     KERN_DOMAINNAME=8,
  74.  
  75.     KERN_SECURELVL=14,    /* int: system security level */
  76.     KERN_PANIC=15,        /* int: panic timeout */
  77.     KERN_REALROOTDEV=16,    /* real root device to mount after initrd */
  78.  
  79.     KERN_JAVA_INTERPRETER=19, /* path to Java(tm) interpreter */
  80.     KERN_JAVA_APPLETVIEWER=20, /* path to Java(tm) appletviewer */
  81.     KERN_SPARC_REBOOT=21,    /* reboot command on Sparc */
  82.     KERN_CTLALTDEL=22,    /* int: allow ctl-alt-del to reboot */
  83.     KERN_PRINTK=23,        /* struct: control printk logging parameters */
  84.     KERN_NAMETRANS=24,    /* Name translation */
  85.     KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */
  86.     KERN_PPC_ZEROPAGED=26,    /* turn idle page zeroing on/off on PPC */
  87.     KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */
  88.     KERN_MODPROBE=28,
  89.     KERN_SG_BIG_BUFF=29,
  90.     KERN_ACCT=30,        /* BSD process accounting parameters */
  91.     KERN_PPC_L2CR=31,    /* l2cr register on PPC */
  92.  
  93.     KERN_RTSIGNR=32,    /* Number of rt sigs queued */
  94.     KERN_RTSIGMAX=33,    /* Max queuable */
  95.     
  96.     KERN_SHMMAX=34,         /* int: Maximum shared memory segment */
  97.     KERN_MSGMAX=35,         /* int: Maximum size of a messege */
  98.     KERN_MSGMNB=36,         /* int: Maximum message queue size */
  99.     KERN_MSGPOOL=37         /* int: Maximum system message pool size */
  100. };
  101.  
  102.  
  103. /* CTL_VM names: */
  104. enum
  105. {
  106.     VM_SWAPCTL=1,        /* struct: Set vm swapping control */
  107.     VM_SWAPOUT=2,        /* int: Background pageout interval */
  108.     VM_FREEPG=3,        /* struct: Set free page thresholds */
  109.     VM_BDFLUSH=4,        /* struct: Control buffer cache flushing */
  110.     VM_OVERCOMMIT_MEMORY=5,    /* Turn off the virtual memory safety limit */
  111.     VM_BUFFERMEM=6,        /* struct: Set buffer memory thresholds */
  112.     VM_PAGECACHE=7,        /* struct: Set cache memory thresholds */
  113.     VM_PAGERDAEMON=8,    /* struct: Control kswapd behaviour */
  114.     VM_PGT_CACHE=9,        /* struct: Set page table cache parameters */
  115.     VM_PAGE_CLUSTER=10    /* int: set number of pages to swap together */
  116. };
  117.  
  118.  
  119. /* CTL_NET names: */
  120. enum
  121. {
  122.     NET_CORE=1,
  123.     NET_ETHER=2,
  124.     NET_802=3,
  125.     NET_UNIX=4,
  126.     NET_IPV4=5,
  127.     NET_IPX=6,
  128.     NET_ATALK=7,
  129.     NET_NETROM=8,
  130.     NET_AX25=9,
  131.     NET_BRIDGE=10,
  132.     NET_ROSE=11,
  133.     NET_IPV6=12,
  134.     NET_X25=13,
  135.     NET_TR=14,
  136.     NET_DECNET=15
  137. };
  138.  
  139.  
  140. /* /proc/sys/net/core */
  141. enum
  142. {
  143.     NET_CORE_WMEM_MAX=1,
  144.     NET_CORE_RMEM_MAX=2,
  145.     NET_CORE_WMEM_DEFAULT=3,
  146.     NET_CORE_RMEM_DEFAULT=4,
  147. /* was    NET_CORE_DESTROY_DELAY */
  148.     NET_CORE_MAX_BACKLOG=6,
  149.     NET_CORE_FASTROUTE=7,
  150.     NET_CORE_MSG_COST=8,
  151.     NET_CORE_MSG_BURST=9,
  152.     NET_CORE_OPTMEM_MAX=10
  153. };
  154.  
  155. /* /proc/sys/net/ethernet */
  156.  
  157. /* /proc/sys/net/802 */
  158.  
  159. /* /proc/sys/net/unix */
  160.  
  161. enum
  162. {
  163.     NET_UNIX_DESTROY_DELAY=1,
  164.     NET_UNIX_DELETE_DELAY=2,
  165.     NET_UNIX_MAX_DGRAM_QLEN=3,
  166. };
  167.  
  168. /* /proc/sys/net/ipv4 */
  169. enum
  170. {
  171.     /* v2.0 compatibile variables */
  172.     NET_IPV4_FORWARD=8,
  173.     NET_IPV4_DYNADDR=9,
  174.  
  175.     NET_IPV4_CONF=16,
  176.     NET_IPV4_NEIGH=17,
  177.     NET_IPV4_ROUTE=18,
  178.     NET_IPV4_FIB_HASH=19,
  179.  
  180.     NET_IPV4_TCP_TIMESTAMPS=33,
  181.     NET_IPV4_TCP_WINDOW_SCALING=34,
  182.     NET_IPV4_TCP_SACK=35,
  183.     NET_IPV4_TCP_RETRANS_COLLAPSE=36,
  184.     NET_IPV4_DEFAULT_TTL=37,
  185.     NET_IPV4_AUTOCONFIG=38,
  186.     NET_IPV4_NO_PMTU_DISC=39,
  187.     NET_IPV4_TCP_SYN_RETRIES=40,
  188.     NET_IPV4_IPFRAG_HIGH_THRESH=41,
  189.     NET_IPV4_IPFRAG_LOW_THRESH=42,
  190.     NET_IPV4_IPFRAG_TIME=43,
  191.     NET_IPV4_TCP_MAX_KA_PROBES=44,
  192.     NET_IPV4_TCP_KEEPALIVE_TIME=45,
  193.     NET_IPV4_TCP_KEEPALIVE_PROBES=46,
  194.     NET_IPV4_TCP_RETRIES1=47,
  195.     NET_IPV4_TCP_RETRIES2=48,
  196.     NET_IPV4_TCP_FIN_TIMEOUT=49,
  197.     NET_IPV4_IP_MASQ_DEBUG=50,
  198.     NET_TCP_SYNCOOKIES=51,
  199.     NET_TCP_STDURG=52,
  200.     NET_TCP_RFC1337=53,
  201.     NET_TCP_SYN_TAILDROP=54,
  202.     NET_TCP_MAX_SYN_BACKLOG=55,
  203.     NET_IPV4_LOCAL_PORT_RANGE=56,
  204.     NET_IPV4_ICMP_ECHO_IGNORE_ALL=57,
  205.     NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58,
  206.     NET_IPV4_ICMP_SOURCEQUENCH_RATE=59,
  207.     NET_IPV4_ICMP_DESTUNREACH_RATE=60,
  208.     NET_IPV4_ICMP_TIMEEXCEED_RATE=61,
  209.     NET_IPV4_ICMP_PARAMPROB_RATE=62,
  210.     NET_IPV4_ICMP_ECHOREPLY_RATE=63,
  211.     NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
  212.     NET_IPV4_IGMP_MAX_MEMBERSHIPS=65
  213. };
  214.  
  215. enum {
  216.     NET_IPV4_ROUTE_FLUSH=1,
  217.     NET_IPV4_ROUTE_MIN_DELAY=2,
  218.     NET_IPV4_ROUTE_MAX_DELAY=3,
  219.     NET_IPV4_ROUTE_GC_THRESH=4,
  220.     NET_IPV4_ROUTE_MAX_SIZE=5,
  221.     NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
  222.     NET_IPV4_ROUTE_GC_TIMEOUT=7,
  223.     NET_IPV4_ROUTE_GC_INTERVAL=8,
  224.     NET_IPV4_ROUTE_REDIRECT_LOAD=9,
  225.     NET_IPV4_ROUTE_REDIRECT_NUMBER=10,
  226.     NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
  227.     NET_IPV4_ROUTE_ERROR_COST=12,
  228.     NET_IPV4_ROUTE_ERROR_BURST=13,
  229.     NET_IPV4_ROUTE_GC_ELASTICITY=14,
  230.     NET_IPV4_ROUTE_MTU_EXPIRES=15
  231. };
  232.  
  233. enum
  234. {
  235.     NET_PROTO_CONF_ALL=-2,
  236.     NET_PROTO_CONF_DEFAULT=-3
  237.  
  238.     /* And device ifindices ... */
  239. };
  240.  
  241. enum
  242. {
  243.     NET_IPV4_CONF_FORWARDING=1,
  244.     NET_IPV4_CONF_MC_FORWARDING=2,
  245.     NET_IPV4_CONF_PROXY_ARP=3,
  246.     NET_IPV4_CONF_ACCEPT_REDIRECTS=4,
  247.     NET_IPV4_CONF_SECURE_REDIRECTS=5,
  248.     NET_IPV4_CONF_SEND_REDIRECTS=6,
  249.     NET_IPV4_CONF_SHARED_MEDIA=7,
  250.     NET_IPV4_CONF_RP_FILTER=8,
  251.     NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9,
  252.     NET_IPV4_CONF_BOOTP_RELAY=10,
  253.     NET_IPV4_CONF_LOG_MARTIANS=11
  254. };
  255.  
  256. /* /proc/sys/net/ipv6 */
  257. enum {
  258.     NET_IPV6_CONF=16,
  259.     NET_IPV6_NEIGH=17,
  260.     NET_IPV6_ROUTE=18
  261. };
  262.  
  263. enum {
  264.     NET_IPV6_ROUTE_FLUSH=1,
  265.     NET_IPV6_ROUTE_GC_THRESH=2,
  266.     NET_IPV6_ROUTE_MAX_SIZE=3,
  267.     NET_IPV6_ROUTE_GC_MIN_INTERVAL=4,
  268.     NET_IPV6_ROUTE_GC_TIMEOUT=5,
  269.     NET_IPV6_ROUTE_GC_INTERVAL=6,
  270.     NET_IPV6_ROUTE_GC_ELASTICITY=7,
  271.     NET_IPV6_ROUTE_MTU_EXPIRES=8
  272. };
  273.  
  274. enum {
  275.     NET_IPV6_FORWARDING=1,
  276.     NET_IPV6_HOP_LIMIT=2,
  277.     NET_IPV6_MTU=3,
  278.     NET_IPV6_ACCEPT_RA=4,
  279.     NET_IPV6_ACCEPT_REDIRECTS=5,
  280.     NET_IPV6_AUTOCONF=6,
  281.     NET_IPV6_DAD_TRANSMITS=7,
  282.     NET_IPV6_RTR_SOLICITS=8,
  283.     NET_IPV6_RTR_SOLICIT_INTERVAL=9,
  284.     NET_IPV6_RTR_SOLICIT_DELAY=10
  285. };
  286.  
  287. /* /proc/sys/net/<protocol>/neigh/<dev> */
  288. enum {
  289.     NET_NEIGH_MCAST_SOLICIT=1,
  290.     NET_NEIGH_UCAST_SOLICIT=2,
  291.     NET_NEIGH_APP_SOLICIT=3,
  292.     NET_NEIGH_RETRANS_TIME=4,
  293.     NET_NEIGH_REACHABLE_TIME=5,
  294.     NET_NEIGH_DELAY_PROBE_TIME=6,
  295.     NET_NEIGH_GC_STALE_TIME=7,
  296.     NET_NEIGH_UNRES_QLEN=8,
  297.     NET_NEIGH_PROXY_QLEN=9,
  298.     NET_NEIGH_ANYCAST_DELAY=10,
  299.     NET_NEIGH_PROXY_DELAY=11,
  300.     NET_NEIGH_LOCKTIME=12,
  301.     NET_NEIGH_GC_INTERVAL=13,
  302.     NET_NEIGH_GC_THRESH1=14,
  303.     NET_NEIGH_GC_THRESH2=15,
  304.     NET_NEIGH_GC_THRESH3=16
  305. };
  306.  
  307. /* /proc/sys/net/ipx */
  308.  
  309.  
  310. /* /proc/sys/net/appletalk */
  311. enum {
  312.     NET_ATALK_AARP_EXPIRY_TIME=1,
  313.     NET_ATALK_AARP_TICK_TIME=2,
  314.     NET_ATALK_AARP_RETRANSMIT_LIMIT=3,
  315.     NET_ATALK_AARP_RESOLVE_TIME=4
  316. };
  317.  
  318.  
  319. /* /proc/sys/net/netrom */
  320. enum {
  321.     NET_NETROM_DEFAULT_PATH_QUALITY=1,
  322.     NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2,
  323.     NET_NETROM_NETWORK_TTL_INITIALISER=3,
  324.     NET_NETROM_TRANSPORT_TIMEOUT=4,
  325.     NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5,
  326.     NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6,
  327.     NET_NETROM_TRANSPORT_BUSY_DELAY=7,
  328.     NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8,
  329.     NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9,
  330.     NET_NETROM_ROUTING_CONTROL=10,
  331.     NET_NETROM_LINK_FAILS_COUNT=11
  332. };
  333.  
  334. /* /proc/sys/net/ax25 */
  335. enum {
  336.     NET_AX25_IP_DEFAULT_MODE=1,
  337.     NET_AX25_DEFAULT_MODE=2,
  338.     NET_AX25_BACKOFF_TYPE=3,
  339.     NET_AX25_CONNECT_MODE=4,
  340.     NET_AX25_STANDARD_WINDOW=5,
  341.     NET_AX25_EXTENDED_WINDOW=6,
  342.     NET_AX25_T1_TIMEOUT=7,
  343.     NET_AX25_T2_TIMEOUT=8,
  344.     NET_AX25_T3_TIMEOUT=9,
  345.     NET_AX25_IDLE_TIMEOUT=10,
  346.     NET_AX25_N2=11,
  347.     NET_AX25_PACLEN=12,
  348.     NET_AX25_PROTOCOL=13,
  349.     NET_AX25_DAMA_SLAVE_TIMEOUT=14
  350. };
  351.  
  352. /* /proc/sys/net/rose */
  353. enum {
  354.     NET_ROSE_RESTART_REQUEST_TIMEOUT=1,
  355.     NET_ROSE_CALL_REQUEST_TIMEOUT=2,
  356.     NET_ROSE_RESET_REQUEST_TIMEOUT=3,
  357.     NET_ROSE_CLEAR_REQUEST_TIMEOUT=4,
  358.     NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5,
  359.     NET_ROSE_ROUTING_CONTROL=6,
  360.     NET_ROSE_LINK_FAIL_TIMEOUT=7,
  361.     NET_ROSE_MAX_VCS=8,
  362.     NET_ROSE_WINDOW_SIZE=9,
  363.     NET_ROSE_NO_ACTIVITY_TIMEOUT=10
  364. };
  365.  
  366. /* /proc/sys/net/x25 */
  367. enum {
  368.     NET_X25_RESTART_REQUEST_TIMEOUT=1,
  369.     NET_X25_CALL_REQUEST_TIMEOUT=2,
  370.     NET_X25_RESET_REQUEST_TIMEOUT=3,
  371.     NET_X25_CLEAR_REQUEST_TIMEOUT=4,
  372.     NET_X25_ACK_HOLD_BACK_TIMEOUT=5
  373. };
  374.  
  375. /* /proc/sys/net/token-ring */
  376. enum
  377. {
  378.     NET_TR_RIF_TIMEOUT=1
  379. };
  380.  
  381. /* /proc/sys/net/decnet */
  382. enum {
  383.     NET_DECNET_DEF_T3_BROADCAST=1,
  384.     NET_DECNET_DEF_T3_POINTTOPOINT=2,
  385.     NET_DECNET_DEF_T1=3,
  386.     NET_DECNET_DEF_BCT1=4,
  387.     NET_DECNET_CACHETIMEOUT=5,
  388.     NET_DECNET_DEBUG_LEVEL=6
  389. };
  390.  
  391. /* CTL_PROC names: */
  392.  
  393. /* CTL_FS names: */
  394. enum
  395. {
  396.     FS_NRINODE=1,    /* int:current number of allocated inodes */
  397.     FS_STATINODE=2,
  398.     FS_MAXINODE=3,    /* int:maximum number of inodes that can be allocated */
  399.     FS_NRDQUOT=4,    /* int:current number of allocated dquots */
  400.     FS_MAXDQUOT=5,    /* int:maximum number of dquots that can be allocated */
  401.     FS_NRFILE=6,    /* int:current number of allocated filedescriptors */
  402.     FS_MAXFILE=7,    /* int:maximum number of filedescriptors that can be allocated */
  403.     FS_DENTRY=8,
  404.     FS_NRSUPER=9,    /* int:current number of allocated super_blocks */
  405.     FS_MAXSUPER=10     /* int:maximum number of super_blocks that can be allocated */
  406. };
  407.  
  408. /* CTL_DEBUG names: */
  409.  
  410. /* CTL_DEV names: */
  411. enum {
  412.     DEV_CDROM=1,
  413.     DEV_HWMON=2
  414. };
  415.  
  416. /* /proc/sys/dev/cdrom */
  417. enum {
  418.     DEV_CDROM_INFO=1
  419. };
  420.  
  421. #ifdef __KERNEL__
  422.  
  423. extern asmlinkage int sys_sysctl(struct __sysctl_args *);
  424. extern void sysctl_init(void);
  425.  
  426. typedef struct ctl_table ctl_table;
  427.  
  428. typedef int ctl_handler (ctl_table *table, int *name, int nlen,
  429.              void *oldval, size_t *oldlenp,
  430.              void *newval, size_t newlen, 
  431.              void **context);
  432.  
  433. typedef int proc_handler (ctl_table *ctl, int write, struct file * filp,
  434.               void *buffer, size_t *lenp);
  435.  
  436. extern int proc_dostring(ctl_table *, int, struct file *,
  437.              void *, size_t *);
  438. extern int proc_dointvec(ctl_table *, int, struct file *,
  439.              void *, size_t *);
  440. extern int proc_dointvec_minmax(ctl_table *, int, struct file *,
  441.                 void *, size_t *);
  442. extern int proc_dointvec_jiffies(ctl_table *, int, struct file *,
  443.                  void *, size_t *);
  444.  
  445. extern int do_sysctl (int *name, int nlen,
  446.               void *oldval, size_t *oldlenp,
  447.               void *newval, size_t newlen);
  448.  
  449. extern int do_sysctl_strategy (ctl_table *table, 
  450.                    int *name, int nlen,
  451.                    void *oldval, size_t *oldlenp,
  452.                    void *newval, size_t newlen, void ** context);
  453.  
  454. extern ctl_handler sysctl_string;
  455. extern ctl_handler sysctl_intvec;
  456.  
  457. extern int do_string (
  458.     void *oldval, size_t *oldlenp, void *newval, size_t newlen,
  459.     int rdwr, char *data, size_t max);
  460. extern int do_int (
  461.     void *oldval, size_t *oldlenp, void *newval, size_t newlen,
  462.     int rdwr, int *data);
  463. extern int do_struct (
  464.     void *oldval, size_t *oldlenp, void *newval, size_t newlen,
  465.     int rdwr, void *data, size_t len);
  466.  
  467.  
  468. /*
  469.  * Register a set of sysctl names by calling register_sysctl_table
  470.  * with an initialised array of ctl_table's.  An entry with zero
  471.  * ctl_name terminates the table.  table->de will be set up by the
  472.  * registration and need not be initialised in advance.
  473.  *
  474.  * sysctl names can be mirrored automatically under /proc/sys.  The
  475.  * procname supplied controls /proc naming.
  476.  *
  477.  * The table's mode will be honoured both for sys_sysctl(2) and
  478.  * proc-fs access.
  479.  *
  480.  * Leaf nodes in the sysctl tree will be represented by a single file
  481.  * under /proc; non-leaf nodes will be represented by directories.  A
  482.  * null procname disables /proc mirroring at this node.
  483.  * 
  484.  * sysctl(2) can automatically manage read and write requests through
  485.  * the sysctl table.  The data and maxlen fields of the ctl_table
  486.  * struct enable minimal validation of the values being written to be
  487.  * performed, and the mode field allows minimal authentication.
  488.  * 
  489.  * More sophisticated management can be enabled by the provision of a
  490.  * strategy routine with the table entry.  This will be called before
  491.  * any automatic read or write of the data is performed.
  492.  * 
  493.  * The strategy routine may return:
  494.  * <0: Error occurred (error is passed to user process)
  495.  * 0:  OK - proceed with automatic read or write.
  496.  * >0: OK - read or write has been done by the strategy routine, so 
  497.  *     return immediately.
  498.  * 
  499.  * There must be a proc_handler routine for any terminal nodes
  500.  * mirrored under /proc/sys (non-terminals are handled by a built-in
  501.  * directory handler).  Several default handlers are available to
  502.  * cover common cases.
  503.  */
  504.  
  505. /* A sysctl table is an array of struct ctl_table: */
  506. struct ctl_table 
  507. {
  508.     int ctl_name;            /* Binary ID */
  509.     const char *procname;        /* Text ID for /proc/sys, or zero */
  510.     void *data;
  511.     int maxlen;
  512.     mode_t mode;
  513.     ctl_table *child;
  514.     proc_handler *proc_handler;    /* Callback for text formatting */
  515.     ctl_handler *strategy;        /* Callback function for all r/w */
  516.     struct proc_dir_entry *de;    /* /proc control block */
  517.     void *extra1;
  518.     void *extra2;
  519. };
  520.  
  521. /* struct ctl_table_header is used to maintain dynamic lists of
  522.    ctl_table trees. */
  523. struct ctl_table_header
  524. {
  525.     ctl_table *ctl_table;
  526.     DLNODE(struct ctl_table_header) ctl_entry;    
  527. };
  528.  
  529. struct ctl_table_header * register_sysctl_table(ctl_table * table, 
  530.                         int insert_at_head);
  531. void unregister_sysctl_table(struct ctl_table_header * table);
  532.  
  533. #else /* __KERNEL__ */
  534.  
  535. #endif /* __KERNEL__ */
  536.  
  537. #endif /* _LINUX_SYSCTL_H */
  538.